/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hu
 * Date: 2024-04-25
 * Time: 10:23
 */
import java.util.Scanner;
import java.util.Random;
public class Test {
    public static void main(String[] args) {
        for(int i = 1;i <= 5;i++){
            System.out.println(i);
        }
    }
    public static void main9(String[] args) {
        int num = 1;
        int sum = 0;
        while(num <= 5){
            int factoRuslt = 1;
            int tmp = 1;
            while(tmp <= num){
                factoRuslt *= tmp;
                tmp++;
            }
            num++;
            sum += factoRuslt;
        }
        System.out.println(sum);
    }
    public static void main8(String[] args) {
        int i = 1;
        int sum = 0;
        while(i <= 100){
           sum += i;
            i++;
        }
        System.out.println(sum);
    }
    public static void main7(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("请输入日期");
            int day = sc.nextInt();
            switch (day) {
                case 1:
                    System.out.println("周一");
                    break;
                case 2:
                    System.out.println("周二");
                    break;
                case 3:
                    System.out.println("周三");
                    break;
                case 4:
                    System.out.println("周四");
                    break;
                case 5:
                    System.out.println("周五");
                    break;
                case 6:
                    System.out.println("周六");
                    break;
                case 7:
                    System.out.println("周日");
                    break;
                default:
                    System.out.println("输入错误");
            }
        }
    }
    public static void main6(String[] args) {
        int year = 2010;
        if (year % 100 == 0) {
            if (year % 400 == 0) {
                System.out.println("闰年");
            } else {
                System.out.println("不是闰年");
            }
        }else if(year % 4 == 0){
            System.out.println("闰年");
        }else{
            System.out.println("不是闰年");
        }
    }
    public static void main5(String[] args) {
        int num = 10;
        if(num % 2 == 0){
            System.out.println("偶数");
        }else{
            System.out.println("奇数");
        }
    }
    public static void main4(String[] args) {
        while (true) {
            System.out.println("请输入分数");
            Scanner sc = new Scanner(System.in);
            int score = sc.nextInt();
            if (score >= 90) {
                System.out.println("优秀");
            } else if (score >= 80) {
                System.out.println("良好");
            } else if (score >= 70) {
                System.out.println("中等");
            } else if (score >= 60) {
                System.out.println("及格");
            } else {
                System.out.println("不及格");
            }
        }
    }
    public static void main3(String[] args) {
        int score = 96;
        if(score > 90){
            System.out.println("鸡腿");
        }
        else{
            System.out.println("巴掌");
        }
    }
    public static void main2(String[] args) {
       Random random = new Random();
       Scanner sc = new Scanner(System.in);
       int toGuess = random.nextInt(100);
//       System.out.println("toGuess = " + toGuess);
        while(true){
            System.out.println("请输入想要输入的数");
            int num = sc.nextInt();
            if(num < toGuess){
                System.out.println("猜小了");
            }
            else if(num > toGuess){
                System.out.println("猜大了");
            }
            else{
                System.out.println("猜对了");
                break;
            }
        }
        sc.close();
        System.out.println("数字为:" + toGuess);
    }
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int num = 0;
        while(sc.hasNextInt()){
            int tmp = sc.nextInt();
            sum += tmp;
            num++;
        }
        System.out.println("sum = " + sum);
        System.out.println("avg = " + sum / num);
        sc.close();
    }

}
